/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * pesanan_kk.java
 *
 * Created on Nov 24, 2012, 4:46:48 PM
 */
package prototype;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author ryulong
 */
public class pesanan_kk extends javax.swing.JFrame {

    /** Creates new form pesanan_kk */
    public pesanan_kk() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        frame_liat = new javax.swing.JInternalFrame();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        button_ilang = new javax.swing.JButton();
        button_edit = new javax.swing.JButton();
        button_cari = new javax.swing.JButton();
        cari_field = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        panel_pemesan = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        nama_field = new javax.swing.JTextField();
        id_field = new javax.swing.JTextField();
        alamat_field = new javax.swing.JTextField();
        panel_pesanan = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        pesan_field = new javax.swing.JTextField();
        jumlah_field = new javax.swing.JTextField();
        paket_field = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        status_field = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        panel_button = new javax.swing.JPanel();
        tambah_button = new javax.swing.JButton();
        liat_button = new javax.swing.JButton();
        batal_button = new javax.swing.JButton();
        exit_button = new javax.swing.JButton();

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(jTable2);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        frame_liat.setResizable(true);
        frame_liat.setAutoscrolls(true);

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "id", "nama", "alamat", "nama_paket", "jumlah", "tanggal_pakai"
            }
        ));
        jScrollPane3.setViewportView(jTable3);

        button_ilang.setText("Keluar");
        button_ilang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_ilangActionPerformed(evt);
            }
        });

        button_edit.setText("Edit");
        button_edit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_editActionPerformed(evt);
            }
        });

        button_cari.setText("Cari");
        button_cari.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_cariActionPerformed(evt);
            }
        });

        cari_field.setText("jTextField1");
        cari_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cari_fieldActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout frame_liatLayout = new javax.swing.GroupLayout(frame_liat.getContentPane());
        frame_liat.getContentPane().setLayout(frame_liatLayout);
        frame_liatLayout.setHorizontalGroup(
            frame_liatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(frame_liatLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, frame_liatLayout.createSequentialGroup()
                .addGap(53, 53, 53)
                .addComponent(button_edit)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 215, Short.MAX_VALUE)
                .addComponent(button_ilang)
                .addGap(93, 93, 93))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, frame_liatLayout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addComponent(cari_field, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addComponent(button_cari)
                .addGap(62, 62, 62))
        );
        frame_liatLayout.setVerticalGroup(
            frame_liatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(frame_liatLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(frame_liatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(button_cari)
                    .addComponent(cari_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(43, 43, 43)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(frame_liatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(button_ilang)
                    .addComponent(button_edit))
                .addGap(28, 28, 28))
        );

        getContentPane().add(frame_liat, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 40, 470, 340));

        jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel1.setFont(new java.awt.Font("Comic Sans MS", 0, 18));
        jLabel1.setText("SEPEDA-KU");

        jLabel9.setFont(new java.awt.Font("Comic Sans MS", 0, 14));
        jLabel9.setText("Sistem Pengolahan Data Kuliner");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(185, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addGap(185, 185, 185))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(233, 233, 233))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addContainerGap())
        );

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 580, 70));

        panel_pemesan.setBorder(javax.swing.BorderFactory.createTitledBorder("pemesan"));

        jLabel2.setText("Nama :");

        jLabel3.setText("Id :");

        jLabel4.setText("Alamat :");

        nama_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nama_fieldActionPerformed(evt);
            }
        });

        id_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                id_fieldActionPerformed(evt);
            }
        });

        alamat_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                alamat_fieldActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panel_pemesanLayout = new javax.swing.GroupLayout(panel_pemesan);
        panel_pemesan.setLayout(panel_pemesanLayout);
        panel_pemesanLayout.setHorizontalGroup(
            panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_pemesanLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel3)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(id_field, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nama_field, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(alamat_field, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panel_pemesanLayout.setVerticalGroup(
            panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_pemesanLayout.createSequentialGroup()
                .addGroup(panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nama_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(id_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel_pemesanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(alamat_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(panel_pemesan, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 87, 580, -1));

        panel_pesanan.setBorder(javax.swing.BorderFactory.createTitledBorder("Pesanan"));

        jLabel5.setText("nama Paket :");

        jLabel6.setText("jumlah :");

        jLabel7.setText("tanggal digunakan :");

        pesan_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pesan_fieldActionPerformed(evt);
            }
        });

        jumlah_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jumlah_fieldActionPerformed(evt);
            }
        });

        paket_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                paket_fieldActionPerformed(evt);
            }
        });

        jLabel8.setText("ID Pesanan :");

        status_field.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                status_fieldActionPerformed(evt);
            }
        });

        jLabel10.setText("Status :");

        javax.swing.GroupLayout panel_pesananLayout = new javax.swing.GroupLayout(panel_pesanan);
        panel_pesanan.setLayout(panel_pesananLayout);
        panel_pesananLayout.setHorizontalGroup(
            panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_pesananLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel6)
                    .addComponent(jLabel5)
                    .addComponent(jLabel8)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(status_field, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                    .addComponent(pesan_field, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                    .addComponent(paket_field, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                    .addComponent(jumlah_field, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE))
                .addGap(288, 288, 288))
        );
        panel_pesananLayout.setVerticalGroup(
            panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_pesananLayout.createSequentialGroup()
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pesan_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addGap(7, 7, 7)
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(paket_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel6)
                    .addComponent(jumlah_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(8, 8, 8)
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel_pesananLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(status_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(panel_pesanan, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 227, 580, 170));

        panel_button.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));

        tambah_button.setText("tambah");
        tambah_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tambah_buttonActionPerformed(evt);
            }
        });

        liat_button.setText("lihat pesanan");
        liat_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                liat_buttonActionPerformed(evt);
            }
        });

        batal_button.setText("batal");

        exit_button.setText("keluar");

        javax.swing.GroupLayout panel_buttonLayout = new javax.swing.GroupLayout(panel_button);
        panel_button.setLayout(panel_buttonLayout);
        panel_buttonLayout.setHorizontalGroup(
            panel_buttonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_buttonLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tambah_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(liat_button)
                .addGap(104, 104, 104)
                .addComponent(batal_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 160, Short.MAX_VALUE)
                .addComponent(exit_button)
                .addContainerGap())
        );
        panel_buttonLayout.setVerticalGroup(
            panel_buttonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_buttonLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel_buttonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tambah_button)
                    .addComponent(liat_button)
                    .addComponent(batal_button)
                    .addComponent(exit_button))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(panel_button, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 430, 580, -1));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void nama_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nama_fieldActionPerformed
        String kode = nama_field.getText();
        member kat = new member();
        kat.setId(kode);
        kat.setAlamat(kode);
        try {
            mastermind kontrol;
            kontrol = mastermind.mind();
            String nama = kontrol.cari_member(kode);
            id_field.setText(nama);
            String alamat = kontrol.address(kode);
            alamat_field.setText(alamat);
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, "data tidak ada dalam database");
            Logger.getLogger(pesanan_kk.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_nama_fieldActionPerformed

    private void id_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_id_fieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_id_fieldActionPerformed

    private void alamat_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_alamat_fieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_alamat_fieldActionPerformed

    private void pesan_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pesan_fieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_pesan_fieldActionPerformed

    private void jumlah_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jumlah_fieldActionPerformed
        angka(jumlah_field.getText());
    }//GEN-LAST:event_jumlah_fieldActionPerformed

    private void liat_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_liat_buttonActionPerformed
        frame_liat.setVisible(true);
    }//GEN-LAST:event_liat_buttonActionPerformed

    private void button_ilangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_ilangActionPerformed
        frame_liat.setVisible(false);
    }//GEN-LAST:event_button_ilangActionPerformed

    private void paket_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_paket_fieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_paket_fieldActionPerformed

    private void status_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_status_fieldActionPerformed
        setatus(status_field.getText());
    }//GEN-LAST:event_status_fieldActionPerformed

    private void button_editActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_editActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_button_editActionPerformed

    private void button_cariActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_cariActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_button_cariActionPerformed

    private void cari_fieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cari_fieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cari_fieldActionPerformed

    private void tambah_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tambah_buttonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tambah_buttonActionPerformed
    public void angka(String angka) {
        if (!angka.matches("[0-9]*")) {
            JOptionPane.showMessageDialog(this, "Format salah Tolong Isikan angka");
            jumlah_field.setText("");
        }
    }

    public void setatus(String setatus) {
        if (!setatus.equals("Belum") || !setatus.equals("Siap")) {
            JOptionPane.showMessageDialog(this, "harap diisikan dengan kata 'Belum' atau 'Siap'");
            status_field.setText("");
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new pesanan_kk().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField alamat_field;
    private javax.swing.JButton batal_button;
    private javax.swing.JButton button_cari;
    private javax.swing.JButton button_edit;
    private javax.swing.JButton button_ilang;
    private javax.swing.JTextField cari_field;
    private javax.swing.JButton exit_button;
    private javax.swing.JInternalFrame frame_liat;
    private javax.swing.JTextField id_field;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable3;
    private javax.swing.JTextField jumlah_field;
    private javax.swing.JButton liat_button;
    private javax.swing.JTextField nama_field;
    private javax.swing.JTextField paket_field;
    private javax.swing.JPanel panel_button;
    private javax.swing.JPanel panel_pemesan;
    private javax.swing.JPanel panel_pesanan;
    private javax.swing.JTextField pesan_field;
    private javax.swing.JTextField status_field;
    private javax.swing.JButton tambah_button;
    // End of variables declaration//GEN-END:variables
}
